repo: Fix reading repos on read-only media
authorColin Walters <walters@verbum.org>
Mon, 2 May 2016 14:20:46 +0000 (10:20 -0400)
committerColin Walters (automation) <walters+githubbot@verbum.org>
Mon, 2 May 2016 14:27:33 +0000 (14:27 +0000)
commit3111248373c16a3fd6ecb0566bc6f5f42fd4b54c
tree975ca9bcb55e6138084b9938016c32713f5c242a
parenta6c731f6e7d1014aab5989c98a6432d28080905b
repo: Fix reading repos on read-only media

I have a cache drive I often mount read-only, and the previous commit
for opening `tmp/cache` broke since `errno == EROFS`, not `EPERM`.

It turns out we already had the concept of a "writable" repo, so just
piggy back off that.

Closes: #281
Approved by: giuseppe
src/libostree/ostree-repo.c